IntroduceDomain of dom0 can fail when it's already connected.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 13 Sep 2005 16:56:02 +0000 (16:56 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 13 Sep 2005 16:56:02 +0000 (16:56 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/XendDomainInfo.py

index d75d872b5c416ac1fda378eb4fe44899f5c8b5b6..77d59e23f17202a4468c136f55600ceb5ac1efa2 100644 (file)
@@ -27,6 +27,7 @@ import string, re
 import os
 import time
 import threading
+import errno
 
 import xen.lowlevel.xc; xc = xen.lowlevel.xc.new()
 from xen.util.ip import check_subnet, get_current_ipgw
@@ -1097,7 +1098,14 @@ class XendDomainInfo:
         ref = xc.init_store(self.store_channel.port2)
         if ref and ref >= 0:
             self.setStoreRef(ref)
-            IntroduceDomain(self.id, ref, self.store_channel.port1, self.path)
+            try:
+                IntroduceDomain(self.id, ref, self.store_channel.port1,
+                                self.path)
+            except RuntimeError, ex:
+                if ex.args[0] == errno.EISCONN:
+                    pass
+                else:
+                    raise
             # get run-time value of vcpus and update store
             self.exportVCPUSToDB(dom_get(self.id)['vcpus'])